#include <stdio.h>
int main() {
  int n, count = 0, a[3];
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d%d%d", a, a + 1, a + 2);
    count += (a[0] + a[1] + a[2]) >= 2 ? 1 : 0;
  }
  printf("%d\n", count);
  return 0;
}